﻿using ExcelTools;

namespace ExcelToolsSampleDocument
{
  partial class ThisWorkbook
  {
    public static ExcelWorkbook WorkBook
    {
      get { return Globals.Workbook; }
    }
  }

  internal sealed partial class Globals
  {
    private static ExcelWorkbook _Workbook;

    internal static ExcelWorkbook Workbook
    {
      get
      {
        if (_Workbook == null)
          _Workbook = new ExcelWorkbook(ThisWorkbook.ThisApplication.ActiveWorkbook);
        return _Workbook;
      }
    }
  }
}
